home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Oberon⁄F™ 1.2 / Preinstalled version / System / Docu / Ports (.txt) < prev    next >
Encoding:
Oberon Document  |  1996-07-08  |  48.4 KB  |  446 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Helvetica
  22. Helvetica
  23. Helvetica
  24. HostPictures.StdViewDesc
  25. Geneva
  26. (0, 0)
  27. (1, 1)
  28. (2, 2)
  29. area of one pixel
  30. Helvetica
  31. Helvetica
  32. Geneva
  33. openPoly
  34. closedPoly
  35. openBezier
  36. closedBezier
  37. filled closedPoly
  38. filled closedBezier
  39. Geneva
  40. (x0, y0)
  41. (x1, y1)
  42. Geneva
  43. scroll vector
  44. undefined area
  45. before scrolling
  46. after scrolling
  47. Geneva
  48. (x0, y0)
  49. (x1, y1)
  50. Geneva
  51. scroll vector
  52. undefined area
  53. before scrolling
  54. after scrolling
  55. Ports
  56. DEFINITION Ports;
  57.     IMPORT Fonts;
  58.     CONST
  59.         black = 00000000H; white = 00FFFFFFH;
  60.         grey6 = 00F0F0F0H; grey12 = 00E0E0E0H; grey25 = 00C0C0C0H;
  61.         grey50 = 00808080H; grey75 = 00404040H;
  62.         red = 000000FFH; green = 0000FF00H; blue = 00FF0000H;
  63.         defaultColor = 01000000H;
  64.         mm = 36000;
  65.         point = LONG(12700);
  66.         inch = 914400;
  67.         fill = -1;
  68.         openPoly = 0; closedPoly = 1; openBezier = 2; closedBezier = 3;
  69.         invert = 0; hilite = 1; dim25 = 2; dim50 = 3; dim75 = 4;
  70.         hide = FALSE; show = TRUE;
  71.         arrowCursor = 0; textCursor = 1; graphicsCursor = 2; tableCursor = 3; bitmapCursor = 4;
  72.         keepBuffer = FALSE; disposeBuffer = TRUE;
  73.     TYPE
  74.         LONGCHAR = INTEGER;
  75.         Color = LONGINT;
  76.         Point = RECORD
  77.             x, y: LONGINT
  78.         END;
  79.         Port = POINTER TO PortDesc;
  80.         PortDesc = RECORD
  81.             unit-: LONGINT;
  82.             w-, h-: LONGINT;
  83.             PROCEDURE (p: Port) Init (unit: LONGINT);
  84.             PROCEDURE (p: Port) SetSize (w, h: LONGINT);
  85.             PROCEDURE (p: Port) NewRider (): Rider;
  86.             PROCEDURE (p: Port) OpenBuffer (l, t, r, b: LONGINT);
  87.             PROCEDURE (p: Port) CloseBuffer
  88.         END;
  89.         Rider = POINTER TO RiderDesc;
  90.         RiderDesc = RECORD
  91.             l-, t-, r-, b-: LONGINT;
  92.             PROCEDURE (rd: Rider) Set (l, t, r, b: LONGINT);
  93.             PROCEDURE (rd: Rider) Base (): Port;
  94.             PROCEDURE (rd: Rider) Move (dx, dy: LONGINT);
  95.             PROCEDURE (rd: Rider) SaveRect (l, t, r, b: LONGINT; VAR res: LONGINT);
  96.             PROCEDURE (rd: Rider) RestoreRect (l, t, r, b: LONGINT; dispose: BOOLEAN);
  97.             PROCEDURE (rd: Rider) DrawRect (l, t, r, b, s: LONGINT; col: Color);
  98.             PROCEDURE (rd: Rider) DrawOval (l, t, r, b, s: LONGINT; col: Color);
  99.             PROCEDURE (rd: Rider) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color);
  100.             PROCEDURE (rd: Rider) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  101.                                                                         path: INTEGER);
  102.             PROCEDURE (rd: Rider) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN);
  103.             PROCEDURE (rd: Rider) Scroll (dx, dy: LONGINT);
  104.             PROCEDURE (rd: Rider) SetCursor (cursor: INTEGER);
  105.             PROCEDURE (rd: Rider) Input (VAR x, y: LONGINT; VAR modifiers: SET;
  106.                                                                 VAR isDown: BOOLEAN);
  107.             PROCEDURE (rd: Rider) DrawString (x, y: LONGINT; col: Color; VAR s: ARRAY OF CHAR;
  108.                                                                         font: Fonts.Font);
  109.             PROCEDURE (rd: Rider) DrawLString (x, y: LONGINT; col: Color; VAR s: ARRAY OF LONGCHAR;
  110.                                                                         font: Fonts.Font);
  111.             PROCEDURE (rd: Rider) CharIndex (x, pos: LONGINT; VAR s: ARRAY OF CHAR;
  112.                                                                         font: Fonts.Font): LONGINT;
  113.             PROCEDURE (rd: Rider) LCharIndex (x, pos: LONGINT; VAR s: ARRAY OF LONGCHAR;
  114.                                                                         font: Fonts.Font): LONGINT;
  115.             PROCEDURE (rd: Rider) CharPos (x, index: LONGINT; VAR s: ARRAY OF CHAR;
  116.                                                                         font: Fonts.Font): LONGINT;
  117.             PROCEDURE (rd: Rider) LCharPos (x, index: LONGINT; VAR s: ARRAY OF LONGCHAR;
  118.                                                                         font: Fonts.Font): LONGINT
  119.         END;
  120.         Frame = POINTER TO FrameDesc;
  121.         FrameDesc = RECORD
  122.             unit-: LONGINT;
  123.             dot-: LONGINT;
  124.             rider-: Rider;
  125.             gx-, gy-: LONGINT;
  126.             PROCEDURE (f: Frame) ConnectTo (p: Port);
  127.             PROCEDURE (f: Frame) SetOffset (gx, gy: LONGINT);
  128.             PROCEDURE (f: Frame) SaveRect (l, t, r, b: LONGINT; VAR res: LONGINT);
  129.             PROCEDURE (f: Frame) RestoreRect (l, t, r, b: LONGINT; dispose: BOOLEAN);
  130.             PROCEDURE (f: Frame) DrawRect (l, t, r, b, s: LONGINT; col: Color);
  131.             PROCEDURE (f: Frame) DrawOval (l, t, r, b, s: LONGINT; col: Color);
  132.             PROCEDURE (f: Frame) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color);
  133.             PROCEDURE (f: Frame) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  134.                                                                         path: INTEGER);
  135.             PROCEDURE (f: Frame) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN);
  136.             PROCEDURE (f: Frame) Scroll (dx, dy: LONGINT);
  137.             PROCEDURE (f: Frame) SetCursor (cursor: INTEGER);
  138.             PROCEDURE (f: Frame) Input (VAR x, y: LONGINT; VAR modifiers: SET; VAR isDown: BOOLEAN);
  139.             PROCEDURE (f: Frame) DrawString (x, y: LONGINT; col: Color; s: ARRAY OF CHAR;
  140.                                                                         font: Fonts.Font);
  141.             PROCEDURE (f: Frame) DrawLString (x, y: LONGINT; col: Color; s: ARRAY OF LONGCHAR;
  142.                                                                         font: Fonts.Font);
  143.             PROCEDURE (f: Frame) CharIndex (x, pos: LONGINT; s: ARRAY OF CHAR;
  144.                                                                         font: Fonts.Font): LONGINT;
  145.             PROCEDURE (f: Frame) LCharIndex (x, pos: LONGINT; s: ARRAY OF LONGCHAR;
  146.                                                                         font: Fonts.Font): LONGINT;
  147.             PROCEDURE (f: Frame) CharPos (x, index: LONGINT; s: ARRAY OF CHAR;
  148.                                                                         font: Fonts.Font): LONGINT;
  149.             PROCEDURE (f: Frame) LCharPos (x, index: LONGINT; s: ARRAY OF LONGCHAR;
  150.                                                                         font: Fonts.Font): LONGINT
  151.         END;
  152.     VAR background, dialogBackground: Color;
  153.     PROCEDURE RGBColor (red, green, blue: INTEGER): Color;
  154. END Ports.
  155. Ports are carriers for pixel data. Examples of ports are screen and printer ports.
  156. Riders are access paths to ports. The drawing operations of a rider are performed in a coordinate system with positive x-axis and negative y-axis, i.e. x values increase towards the right, while y values increase towards the bottom. This coordinate system is the same for every rider on a port, with the origin at the upper-left corner of the port. Points are coordinate pairs (in device coordinates) which denote the upper-left corner of a pixel:
  157. Picture a:  Drawing Plane
  158. A rider occupies a rectangle within the port area. Each rider acts as a clipping rectangle, to which all its drawing operations are clipped.
  159. Frames are port mappers, which provide port output operations and input from mouse and keyboard. Frame coordinates are scaled and translated such that they are independent of the frame's position on a port, and independent of the port's spacial resolution.
  160. CONST black, white, grey6, grey12, grey25, grey50, grey75, red, green, blue
  161. RGB values for several important colors.
  162. CONST defaultColor
  163. This is a pseudo color which is substituted by the currently set default foreground color for drawing.
  164. CONST mm, point, inch
  165. Three important distance measures in universal units.
  166. CONST fill
  167. This value may be passed to the procedures DrawRect, DrawOval, DrawPath, and MarkRect as size parameter, to cause the drawing of a filled shape, instead of the shape's outline only.
  168. CONST openPoly, closedPoly, openBezier, closedBezier
  169. These values may be passed to the procedure DrawPath as path parameter. They causes the drawing of a polyline, a polygon, an open Bezier curve, or of a closed Bezier curve. Note that with Bezier curves, only every third point lies on the curve.
  170. Picture b:  Various Path Examples
  171. CONST invert, hilite, dim25, dim50, dim75
  172. These values may be passed as mode-parameter to procedure MarkRect. They cause the marked rectangle to become inverted, hilighted, or dimmed. The exact interpretation of these modes is platform-dependent. However, they should alter the display visibly, and they must be invertable. This means that successively drawing a pixel in the same mode twice results in the pixel having the same color as before, provided that no other drawing operation has been performed there in between.
  173. In the simplest case, all three modes are implemented the same way, namely by inverting each bit in the color value which represents a pixel. Ideally, hilite should replace an area's background color with a user-selectable hilight-color, and vice versa. The three dimming modes, applied to a white background, deliver light, medium, and dark grey values, respectively.
  174. CONST hide, show
  175. These values may be passed as show-parameter of the MarkRect procedures. hide means that an existing mark should be removed, and show means that the mark should be drawn.
  176. CONST arrowCursor
  177. The default shape of the cursor.
  178. CONST textCursor, graphicsCursor, tableCursor, bitmapCursor
  179. Cursor shapes which correspond to the type of data currently being manipulated: sequential, large shapes, regularly arranged objects, small shapes.
  180. CONST keepBuffer, disposeBuffer
  181. These constants may be passed to the dispose parameters of procedures Rider.RestoreRect and Frame.RestoreRect.
  182. TYPE LONGCHAR
  183. Type for 2-byte characters in the Unicode character set.
  184. TYPE Color = LONGINT
  185. A color is a four-byte value where the least significant byte (interpreted as unsigned integer) specifies the red-intensity of an RGB triple. The next byte specifies the green-intensity, the third byte represents the blue-intensity. The most significant byte must be set to zero.
  186. TYPE Point
  187. This type is used to construct paths for the DrawPath procedure. A path consists of an array of points, where points are coordinate pairs.
  188. Points are used in drawing routines that call DrawPath.
  189. Points are not extended.
  190. x, y: LONGINT
  191. Coordinate pair.
  192. TYPE Port
  193. Interface
  194. Carrier for pixel data.
  195. Ports are allocated and used internally.
  196. Ports are extended internally.
  197. unit-: LONGINT    unit > 0
  198. The size of a pixel in universal units.
  199. w-, h-: LONGINT    w >= 0  &  h >= 0    [pixels]
  200. Width and height of the port in pixels.
  201. PROCEDURE (p: Port) Init (unit: LONGINT)
  202. Sets the spacial resolution (in universal units per pixel).
  203. p.unit = 0  OR p.unit = unit    20
  204. unit > 0    21
  205. p.unit = unit
  206. PROCEDURE (p: Port) SetSize (w, h: LONGINT)
  207. Sets the port's size, in pixels.
  208. w >= 0    20
  209. h >= 0    21
  210. p.w = w
  211. p.h = h
  212. PROCEDURE (p: Port) NewRider (): Rider
  213. Interface
  214. Returns a rider which has the appropriate type for this port implementation.
  215. PROCEDURE (p: Port) OpenBuffer (l, t, r, b: LONGINT)
  216. Interface
  217. Opens an off-screen buffer for port p. The buffer is initialized with the contents of p's rectangle (l, t, r, b). OpenBuffer must be followed by a call to CloseBuffer. Calls to OpenBuffer must not be nested.
  218. PROCEDURE (p: Port) CloseBuffer
  219. Interface
  220. Copy back the contents of the port's off-screen buffer, and release the buffer. OpenBuffer must have been called before.
  221. TYPE Rider
  222. Interface
  223. Access path to a port (i.e. to a pixel carrier). A rider uses the same coordinate system as its port, with the origin being the upper-left corner of the port. All coordinates used for a rider are in device coordinates, i.e. in pixels.
  224. Riders are allocated by ports.
  225. Riders are used and extended internally.
  226. l-, t-, r-, b-: LONGINT    0 <= l <= r  &  0 <= t <= b    [pixels]
  227. Rider rectangle on the port.
  228. PROCEDURE (rd: Rider) Set (l, t, r, b: LONGINT)
  229. Sets the rider rectangle on the port.
  230. 0 <= l <= r  &  0 <= t <= b    20
  231. rd.l = l  &  rd.t = t  &  rd.r = r  &  rd.b = b
  232. PROCEDURE (rd: Rider) Base (): Port
  233. Interface
  234. Returns the port to which rd is connected.
  235. result # NIL
  236. PROCEDURE (rd: Rider) Move (dx, dy: LONGINT)
  237. Empty
  238. Used internally.
  239. PROCEDURE (rd: Rider) SaveRect (l, t, r, b: LONGINT; VAR res: LONGINT)
  240. Interface
  241. Saves a rectangle (parallel to the coordinate axes) of width r - l and of height b - t in a background buffer, from where it can be restored later using RestoreRect. SaveRect must be balanced by RestoreRect(l, t, r, b, disposeBuffer). Calls to SaveRect may not be nested. res = 0 means that the call was successful, otherwise RestoreRect must not be called.
  242. PROCEDURE (rd: Rider) RestoreRect (l, t, r, b: LONGINT; dispose: BOOLEAN)
  243. Interface
  244. After a successful call to SaveRect, the same rectangle, i.e. its pixelmap contents as it was upon saving, can be restored with RestoreRect. RestoreRect can be called several times in succession; the last time with dispose = disposeBuffer and all other times with dispose = keepBuffer.
  245. PROCEDURE (rd: Rider) DrawRect (l, t, r, b, s: LONGINT; col: Color)
  246. Interface
  247. Draws a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  248. PROCEDURE (rd: Rider) DrawOval (l, t, r, b, s: LONGINT; col: Color)
  249. Interface
  250. Draws an ellipse (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the ellipse is filled with color col. Otherwise, the ellipse is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  251. PROCEDURE (rd: Rider) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color)
  252. Interface
  253. Draws a line from the point (x0, y0) to the point (x1, y1) of thickness s in color col:
  254. Picture c:  Line
  255. If s = 0, a very thin outline (hairline) is used.
  256. s >= 0    20
  257. PROCEDURE (rd: Rider) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  258.                                                                 path: INTEGER)
  259. Interface
  260. Draws the path consisting of points p[0] .. p[n - 1] in color col. The nature of the path is given by parameter path. It can either be a polyline, a polygon, an open Bezier curve, or a closed Bezier curve. The polyline is the same that a sequence of DrawLine operations would generate. For a polygon, the n points define the mathematical region which will be outlined or filled. An open path with n points results in n - 1 path pieces, a closed path with n points results in n path pieces.
  261. SIZE(p) >= n    index error
  262. path = openPoly
  263.     n >= 2    20
  264.     s >= 0    21
  265. path = closedPoly
  266.     n >= 2    20
  267. path = openBezier
  268.     n >= 4    20
  269.     s >= 0    21
  270.     n MOD 3 = 1    22
  271. path = closedBezier
  272.     n >= 3    20
  273.     n MOD 3 = 0    22
  274. PROCEDURE (rd: Rider) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN)
  275. Interface
  276. Marks a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  277. The meaning of mode is implementation-dependent, but it must change the marked area in a visible way, and it must be invertable. show indicates whether the mark should be drawn or removed.
  278. mode IN {invert, hilite, dim25, dim50, dim75}    20
  279. PROCEDURE (rd: Rider) Scroll (dx, dy: LONGINT)
  280. Interface
  281. Shifts the rider's contents by vector (dx, dy). Shifting occurs completely within the rider's rectangle, ie. pixels outside of it are neither written nor read. The part of the rectangle which becomes newly exposed is undefined.
  282. The purpose of Scroll is to speed up scrolling operations by reusing existing pixel data instead of making the application redraw everything.
  283. However, under special circumstances, this procedure may not actually copy pixel data, but cause the application to restore part of the rectangle instead anyway.
  284. Warning: this operation may only be used on interactive ports, in order to update the screen display after a user manipulation.
  285. Picture d:  Effect of Scroll Operation
  286. PROCEDURE (rd: Rider) SetCursor (cursor: INTEGER)
  287. Interface
  288. Sets the cursor to the given value.
  289. cursor IN {arrowCursor..resizeCursor}    20
  290. PROCEDURE (rd: Rider) Input (VAR x, y: LONGINT; VAR modifiers: SET;
  291.                                                         VAR isDown: BOOLEAN)
  292. Interface
  293. Polls the current mouse location and tells whether the mouse button is currently pressed. In modifiers, the currently pressed modifier keys are returned, like Controllers.doubleClick, Controllers.extend, Controllers.modify, and possibly additional platform-specific modifiers.
  294. PROCEDURE (rd: Rider) DrawString (x, y: LONGINT; col: Color; VAR s: ARRAY OF CHAR;
  295.             font: Fonts.Font);
  296. Interface
  297. Draws string s in color col and font font with the base line at y.
  298. Warning: the contents of parameter s may be changed by the operation.
  299. font # NIL    20
  300. PROCEDURE (rd: Rider) DrawLString (x, y: LONGINT; col: Color;
  301.                                                                     VAR s: ARRAY OF LONGCHAR; font: Fonts.Font);
  302. Interface
  303. Draws string s in color col and font font with the base line at y.
  304. Warning: the contents of parameter s may be changed by the operation.
  305. font # NIL    20
  306. PROCEDURE (rd: Rider) CharIndex (x, pos: LONGINT; VAR s: ARRAY OF CHAR;
  307.                                                                     font: Fonts.Font): LONGINT
  308. Interface
  309. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  310. Warning: the contents of parameter s may be changed by the operation.
  311. font # NIL    20
  312. PROCEDURE (rd: Rider) LCharIndex (x, pos: LONGINT; VAR s: ARRAY OF LONGCHAR;
  313.                                                                     font: Fonts.Font): LONGINT
  314. Interface
  315. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  316. Warning: the contents of parameter s may be changed by the operation.
  317. font # NIL    20
  318. PROCEDURE (rd: Rider) CharPos (x, index: LONGINT; VAR s: ARRAY OF CHAR;
  319.                                                                     font: Fonts.Font): LONGINT
  320. Interface
  321. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  322. Warning: the contents of parameter s may be changed by the operation.
  323. font # NIL    20
  324. PROCEDURE (rd: Rider) LCharPos (x, index: LONGINT; VAR s: ARRAY OF LONGCHAR;
  325.                                                                     font: Fonts.Font): LONGINT
  326. Interface
  327. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  328. Warning: the contents of parameter s may be changed by the operation.
  329. font # NIL    20
  330. TYPE Frame
  331. A Frame is a mapper for a port. Every frame has its own coordinate system. All coordinates used for a frame are measured in universal units. Most frame operations forward to the frame's rider, i.e. they call the frame rider's corresponding procedure, and perform the necessary coordinate transformations (scaling between universal units and pixels, and a translation by the frame's origin).
  332. Frames are allocated by views.
  333. Frames are used by views, for drawing and for mouse polling.
  334. Frames are extended internally (Views.Frame).
  335. unit-: LONGINT    unit > 0
  336. The size of a pixel in universal units.
  337. dot-: LONGINT    dot = point - unit MOD point
  338. This value can be used as an approximation of point, rounded to a pixel. By using dot instead of point, ugly rounding errors can be avoided.
  339. rider-: Ports.Rider
  340. Rider which links the frame to a port.
  341. gx-, gy-: LONGINT    [units]
  342. The frame's origin in global coordinates (i.e. relative to the port's upper-left corner), but in units.
  343. PROCEDURE (f: Frame) ConnectTo (p: Port)
  344. Connects the frame to a port. All other frame procedures require a connected frame, i.e. rider # NIL. This precondition is not checked explicitly.
  345. ConnectTo is used internally.
  346. p = NIL
  347.     f.unit = 0
  348.     f.rider = NIL
  349. p # NIL
  350.     f.unit = p.Base().unit
  351.     f.rider # NIL  &  f.rider.Base() = p
  352. PROCEDURE (f: Frame) SetOffset (gx, gy: LONGINT)
  353. Sets the frame's origin, in global coordinates and units. All local coordinates are relative to this origin.
  354. SetOffset is used internally.
  355. f.rider # NIL    20
  356. f.gx = gx  &  f.gy = gy
  357. PROCEDURE (f: Frame) SaveRect (l, t, r, b: LONGINT; VAR res: LONGINT)
  358. Interface
  359. Saves a rectangle (parallel to the coordinate axes) of width r - l and of height b - t in a background buffer, from where it can be restored later using RestoreRect. SaveRect must be balanced by RestoreRect(l, t, r, b, disposeBuffer). Calls to SaveRect may not be nested. res = 0 means that the call was successful, otherwise RestoreRect must not be called.
  360. PROCEDURE (f: Frame) RestoreRect (l, t, r, b: LONGINT; dispose: BOOLEAN)
  361. Interface
  362. After a successful call to SaveRect, the same rectangle, i.e. its pixelmap contents as it was upon saving, can be restored with RestoreRect. RestoreRect can be called several times in succession; the last time with dispose = disposeBuffer and all other times with dispose = keepBuffer.
  363. PROCEDURE (f: Frame) DrawRect (l, t, r, b, s: LONGINT; col: Color)
  364. Draws a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  365. PROCEDURE (f: Frame) DrawOval (l, t, r, b, s: LONGINT; col: Color)
  366. Draws an ellipse (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the ellipse is filled with color col. Otherwise, the ellipse is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  367. PROCEDURE (f: Frame) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color)
  368. Draws a line from the point (x0, y0) to the point (x1, y1) of thickness s in color col:
  369. Picture e:  Line
  370. If s = 0, a very thin outline (hairline) is used.
  371. s >= 0    20
  372. PROCEDURE (f: Frame) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  373.                                                                 path: INTEGER)
  374. Draws the path consisting of points p[0] .. p[n - 1] in color col. The nature of the path is given by parameter path. It can either be a polyline, a polygon, an open Bezier curve, or a closed Bezier curve. The polyline is the same that a sequence of DrawLine operations would generate. For a polygon, the n points define the mathematical region which will be outlined or filled. An open path with n points results in n - 1 path pieces, a closed path with n points results in n path pieces.
  375. SIZE(p) >= n    index error
  376. path = openPoly
  377.     n >= 2    20
  378.     s >= 0    21
  379. path = closedPoly
  380.     n >= 2    20
  381. path = openBezier
  382.     n >= 4    20
  383.     s >= 0    21
  384.     n MOD 3 = 1    22
  385. path = closedBezier
  386.     n >= 3    20
  387.     n MOD 3 = 0    22
  388. PROCEDURE (f: Frame) MarkRect (l, t, r, b, s: LONGINT; col: Color; mode: INTEGER;
  389.                                                                 show: BOOLEAN)
  390. Marks a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle.
  391. The meaning of mode is implementation-dependent, but it must change the marked area in a visible way, and it must be involutory. If s = 0, a very thin outline (hairline) is used. show indicates whether the mark should be drawn or removed.
  392. mode IN {invert, hilite, dim25, dim50, dim75}    20
  393. PROCEDURE (f: Frame) Scroll (dx, dy: LONGINT)
  394. Shifts the frame's area by vector (dx, dy). Shifting occurs completely within the frame's rectangle, ie. pixels outside of it are neither written nor read. The part of the rectangle which becomes newly exposed should be considered as undefined.
  395. The purpose of Scroll is to speed up scrolling and editing operations by reusing existing pixel data instead of making the application redraw everything.
  396. However, under special circumstances, this procedure may not actually copy pixel data, but cause the application to restore part of the rectangle instead anyway.
  397. Warning: this operation may only be used on interactive ports, in order to update the screen display after a user manipulation.
  398. Picture f:  Effect of Scroll Operation
  399. PROCEDURE (f: Frame) SetCursor (cursor: INTEGER)
  400. Sets the cursor to the given value.
  401. SetCursor is used in polling loops during mouse tracking.
  402. cursor IN {arrowCursor..resizeCursor}    20
  403. PROCEDURE (f: Frame) Input (VAR x, y: LONGINT; VAR modifiers: SET; VAR isDown: BOOLEAN)
  404. Polls the current mouse location and tells whether the mouse button is currently pressed.
  405. Input is used in polling loops during mouse tracking. In modifiers, the currently pressed modifier keys are returned, like Controllers.doubleClick, Controllers.extend, Controllers.modify, and possibly additional platform-specific modifiers.
  406. PROCEDURE (f: Frame) DrawString (x, y: LONGINT; col: Color; s: ARRAY OF CHAR;
  407.                                                                     font: Fonts.Font)
  408. Draws string s in color col and font font with the base line at y.
  409. font # NIL    20
  410. PROCEDURE (f: Frame) DrawLString (x, y: LONGINT; col: Color; s: ARRAY OF LONGCHAR;
  411.                                                                     font: Fonts.Font)
  412. Draws string s in color col and font font with the base line at y.
  413. font # NIL    20
  414. PROCEDURE (f: Frame) CharIndex (x, pos: LONGINT; s: ARRAY OF CHAR;
  415.                                                                     font: Fonts.Font): LONGINT
  416. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  417. font # NIL    20
  418. PROCEDURE (f: Frame) LCharIndex (x, pos: LONGINT; s: ARRAY OF LONGCHAR;
  419.                                                                     font: Fonts.Font): LONGINT
  420. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  421. font # NIL    20
  422. PROCEDURE (f: Frame) CharPos (x, index: LONGINT; s: ARRAY OF CHAR;
  423.                                                                     font: Fonts.Font): LONGINT
  424. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  425. font # NIL    20
  426. PROCEDURE (f: Frame) LCharPos (x, index: LONGINT; s: ARRAY OF LONGCHAR;
  427.                                                                     font: Fonts.Font): LONGINT
  428. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  429. font # NIL    20
  430. VAR background: Color    background >= 0
  431. This variable denotes the color which is used for the background of a window.
  432. VAR dialogBackground: Color    dialogBackground >= 0
  433. This variable denotes the color which is used for the background of a dialog.
  434. PROCEDURE RGBColor (red, green, blue: INTEGER): Color
  435. Constructs a Color out of the red, green, and blue components.
  436. 0 <= red < 256    20
  437. 0 <= green < 256    21
  438. 0 <= blue < 256    22
  439. result = blue * 65536  +  green * 256  + red
  440. TextControllers.StdCtrlDesc
  441. TextControllers.ControllerDesc
  442. Containers.ControllerDesc
  443. Controllers.ControllerDesc
  444. Helvetica
  445. Documents.ControllerDesc
  446.